home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
TECHNICA
/
AUTOCAD
/
H107.ZIP
/
HAT20.ZIP
/
HAT20.DOC
next >
Wrap
Text File
|
1991-05-31
|
26KB
|
589 lines
HAT hatch utilities version 2.0 (c)1991 Michael E. Ross
All Rights Reserved.
This program is distributed as Shareware. You are allowed
to try the HAT hatch utilities FREE, but if you decide to
keep the utilities, you MUST register. See the registration
form HATORDER.DOC included with the HAT programs. Your
evaluation period must not exceed 2 weeks.
| The trial copy of HAT has been embedded with registration
| reminder notices. When you register your copy, you will be
| sent a new copy of HAT 2.0 with no such reminder notices.
THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED
WARRANTY. ALL IMPLIED WARRANTIES ARE HEREBY DISCLAIMED.
HAT is a group of programs designed to make using the hatch
utility of AutoCAD easier.
Feel free to distribute HAT, as long as you include:
HAT20.DOC this file
HAT20.LSP the program
HAT20.MNU icon menu accessed by HAT20.LSP
HAT20.DWG sample drawing to try HAT (try it!)
HATORDER.DOC order form
| If you simply pass along the compressed HAT20 file all these
| files will be included. The Compression format will depend
| on where you obtained the HAT20 file. Some electronic
| bulletin boards may distribute only ZIP files which must be
| decompressed with PkunZIP. If the HAT20 file you have has
| an .EXE extension, then this is a self extracting compressed
| file and you need only type the word HAT20 for decompression
| to begin.
Even if you decide not to register, please fill out the
comments portion of the registration form to let me know what
you thought and any suggestions you may have.
Finally, please don't abuse the Shareware system, it has been
a real boon to thousands of computer users, and has provided
fantastic macros and programming. It provides you with the
opportunity to try software out BEFORE you buy it.
To register your copy of HAT 2.0, simply print out and
complete the accompanying order form, HATORDER.DOC. Send the
completed form with your payment to the address shown on the
order form, or listed at the end of this document.
The order price for HAT 2.0 is $20.00 (U.S.).
If you wish to upgrade from HAT 1.4, There is no fee, just
send in the order form as your registration. Upgrading from
HAT 1.3 and earlier versions is $6.00.
Page 2
HAT 2.0
Instruction Manual
21 May 91
(c)1991 Michael E. Ross
All Rights Reserved
Table of Contents: Page
Introduction, What is HAT 2.0 ........................3
What HAT does.........................................3
Installing HAT 2.0 ...................................4
How to use HAT........................................6
Tips on using HAT.....................................9
Enhancements to HAT...................................11
Technical info........................................13
Changes and additions to this manual are denoted by a
vertical line in the left margin.
AutoCAD & AutoLISP are registered trademarks of AutoDesk Inc
Page 3
----------------------What is HAT 2.0------------------------
| HAT20.LSP is an AutoLISP program which enhances AutoCAD
| R.10 and R.11 hatch command.
| Have you ever tried to find out what pattern name, scale or
| angle was used to create an existing hatch pattern? Did you
| try the List command and select the hatch pattern only to no
| avail?
Or have you ever created a hatched area only to decide you
don't like the scale or rotation angle, or you wish you
could just move the pattern slightly? If so, you most likely
erased the pattern and rehatched the area, possibly repeating
the process several times until you were satisfied.
If you have wished for an easy solution to these problems,
then HAT is for you!
----------------------WHAT HAT.LSP DOES----------------------
HAT works much like the AutoCAD hatch command, but also
allows you to dynamically RESCALE and ROTATE, and MOVE hatch
patterns as you create them.
In addition, HAT records hatch information about each hatch
pattern it creates. This information is stored with the
drawing and may be REFERENCED at any time.
If you want to hatch an area with the same pattern, scale and
angle as an existing pattern, there is also a SELECT option
to MATCH existing patterns.
HAT can only extract reference information from hatch
patterns which were created with the HAT command.
HAT improves on the AutoCAD hatch command by giving full
control of hatch patterns. HAT does everything the hatch
command does and more!
HAT even knows if a pattern has been rescaled or rotated
after its original creation. When you query HAT about such
a hatch pattern, HAT will report the actual scale and
rotation.
Page 4
---------------------INSTALLING HAT 2.0----------------------
| HAT 2.0 is for use with AutoCAD R.10 and R.11 dos versions.
Installing HAT is easy.
| If you just have one file called HAT20.EXE or HAT20.ZIP or
| some such name, the first step is decompressing the HAT
| files.
| If you are reading this, you obviously have successfully
| decompressed the HAT20 compressed file, however the
| following is provided for the sake of general information.
| In the case of HAT20.EXE, this is a self extracting
| compressed file. All you need to do is log onto the drive
| which contains HAT20.EXE, and type HAT20 and enter. The
| HAT files will be automatically decompressed to the drive
| where HAT20 is located.
| If your file is called HAT20.ZIP you will need to
| decompress with PkunZIP program (available as Shareware
| on most electronic bulletin boards).
| The compression format for the HAT20 compressed file will
| depend on where you obtained the HAT20 file from. If your
| source was Compuserve, the format will be EXE or self
| extracting. Some electronic bulletin boards use their own
| standard compression format such as ZIP or PAK.
| Decompressing the HAT20 compressed file will generate the
| following 5 HAT files:
| HAT20.DOC this file
| HAT20.LSP the program
| HAT20.MNU icon menu accessed by hat.lsp
| HAT20.DWG sample drawing to try HAT (try it!)
| HATORDER.DOC order form
| Now you simply copy the above files to the directory you use
| for AutoCAD. See example below.
If you use a special directory for lisp programs you may
put HAT20.LSP there, but the file HAT20.MNU must be in the
AutoCAD library path (either the directory where ACAD.EXE
is or a directory specified by the ACAD environment
variable. [I.E. SET ACAD=path;anotherpath;yetanotherpath]
see AutoCAD Reference Manual R.11, page 480).
Page 5
example:
Your acad.exe file is on the D: drive, \acad subdirectory.
The HAT files are on a floppy diskette in drive A:.
simply type:
copy a:*.* d:\acad
and hit return
Now when you are in AutoCAD drawing editor, you can type:
(load"hat20")
and hit return. You must type the parenthesis and quotes
exactly as shown. When you have done this you will see the
message:
Loaded HAT 2.0 programs. (c)1991 Michael E. Ross.
You may now type:
hat
and hit return. The HAT program will take it from there!
Page 6
------------------------HOW TO USE HAT-----------------------
For a "Quick Intro" to HAT, load the sample drawing,
HAT20.DWG, on your machine and follow the suggestions shown.
Load the HAT programs by typing (load"hat20") from the
AutoCAD drawing editor, (the hat files must be in the ACAD
search path such as the directory where ACAD.EXE is). For
more information on the load command, see page 113 of the
AutoLISP Programmers Reference Release 11.
(see "Installing HAT 2.0" above)
Type the word hat from the Command: prompt. That's all
there is to it. Follow the prompts as you would the regular
hatch command:
1. Pattern name / [S]elect / [U]ser / ? / <default>:
a. you can type the name of the pattern you want to use.
b. type S and you may Select an existing hatch to match
it (as long as it was created with HAT.LSP).
c. type U and create a user defined hatch just like the
user option of the standard hatch command.
d. type a ? and you can use the icon menus to select
your pattern. (see the section of this document
titled "INSTALLING HAT 2.0")
e. hit return to accept the default pattern.
Any of the N,O, or I modifiers may be added to the
pattern name. (see page 400 R.11 reference manual)
Any "legal" pattern name may be specified whether
it is part of ACAD.PAT or a custom pattern name.
(see page 402 R.11 reference manual)
2. Scale for pattern <default>:
a. type in a scale (or pick 2 points on screen)
b. hit return to accept the default
3. Angle for pattern <default>:
a. type in an angle (or you can pick an angle on screen)
b. hit return to accept the default
4. Select objects
pick the border(s) for your hatch pattern using any of
the standard Select options.
HAT.LSP hatches the selected area and prompts you for
rescaling and rotating options:
Page 7
5. Do you want to REscale / ROtate / Move? <No>:
a. type the first letter(s) of the option you want.
Hat will reprompt you for new value required, then
rehatch the area automatically, and return to this
prompt. You can keep adjusting the pattern until you
are satisfied.
b. hit return to accept the scale angle and position.
| The next prompt only applies to AutoCAD R.10 users, if your
| system is AutoCAD R.11 or above, HAT 2.0 uses a different,
| more efficient technique to attach reference information,
| namely extended entity data. This only adds about 100 bytes
| to your drawing, so HAT does not bother to ask whether you
| want it attached, it just does it.
6. Do you want to make a Hatch Reference Block? <Yes>:
a. hit return to store the info about the hatch you just
made. An invisible reference block will be inserted
into the drawing. The reference block takes about 400
bytes.
b. if for some reason, you don't want the reference
block to be inserted, type n. If you do this, you
won't be able to get the pattern info (name, scale,
and angle) at a later time, it will be just like a
hatch created with the 'hatch' command.
That's it! Not only does HAT.LSP make creating hatch patterns
easier but it enables you to find out what pattern, scale and
angle was used at any time in the drawings life.
After having created a hatch pattern using HAT, you may now
reference that pattern at any time to find the pattern's
scale and rotation angle. To do this, HAT.LSP must be loaded
as above, then:
HATREF
Type 'hatref' from the command prompt. You will be prompted
to select a hatch pattern. When you do, the pattern name,
it's scale and angle will be printed to the screen.
If you try this on a pattern with no reference block, such
as a hatch pattern created with the standard hatch command,
you will be so informed.
Page 8
HATCLR
Function to erase stray HAT attributes left by exploding a
| hatch pattern created with HAT 1.5 or earlier. These
attributes are for the most part harmless, but may plot as
a dot in your drawing and will cause attribute prompting if
the drawing they are in is inserted as a block. HATCLR
finds them, and gets rid of them. To use HATCLR simply load
HAT as described above, and type 'hatclr' at the command
prompt.
| HAT 2.0 does not use attributes to store hatch information,
| it uses extended entity data. This approach, only possible
| with new lisp commands in R.11 is faster, cleaner, uses
| less memory and leaves no stray attributes if you should
| explode the hatch pattern.
Page 9
-------------------TIPS ON USING HAT 2.0---------------------
Hat may be employed to manipulate hatch patterns in some very
useful ways. Here are a few examples:
EXAMPLE 1:
When a normal hatch pattern is included in a stretch
operation, it usually stays put, right where it was. (We
know that hatch patterns themselves cannot be stretched,
right? but often they and their surrounding objects need to
be stretched). In the above example, then, the hatch itself
stayed put because hatch patterns are blocks and their
insert point is the SNAPBASE point, usually 0,0. So unless
the crossing window selected for the stretch operation
included the point 0,0, the hatch does not move with the
rest of the objects.
Here is where HAT comes to the rescue! Using the HAT
program allows you to "move" the hatch pattern as you
create it. This actually moves the SNAPBASE point to a
new location and rehatches. This allows you to use the
Move option to move the insert point of the hatch pattern
to some point within the hatch, and subsequent stretch
commands will be much more likely to really move the
hatch pattern with its surrounding entities.
To accomplish this, when HAT displays:
Do you want to REscale / ROtate / Move? <No>:
respond with "M", then for the basepoint of the move, use:
"osnap insert", and select the hatch pattern. This will
get the original insert point of the hatch pattern. For
the second point of the move, pick a point somewhere
within the hatch. Complete the HAT operation by Rescaling,
Rotating etc. That's it! You can check the insert point
of the new hatch pattern (draw a temporary line from the
"osnap insert" of the new hatch, there's it's insert
point). The next time you try to stretch it and it's
surrounding entities, as long as your crossing window
contains this insert point, the hatch will move with the
other entities.
A side note, don't worry about changing the SNAPBASE
point, HAT resets it to its former location.
Page 10
EXAMPLE 2:
The Move option of HAT also allows you to align a new hatch
pattern created adjacent to an existing hatched area.
If you wish to hatch an area next to an existing hatched
area, possibly to expand the hatched area without redoing
the whole thing, first use the Select option described
above to "match" the pattern, scale and angle. If the old
hatch pattern has been moved, rotated or relocated in any
way, the new pattern will have a different insert point
and the patterns will not align.
To align the new pattern to the old one, simply use the
Move option during the HAT operation; type "M" for move,
then for the base point or displacement, use "osnap
insert" and select a point on the NEW hatch pattern, for
the second point of the move, use "osnap insert" and
select a point on the OLD hatch pattern. This will change
the insert point of the new hatch pattern to match that
of the old one, thereby aligning the patterns.
This procedure only works with hatch patterns created with
HAT. Normally AutoCAD R.11 sets the insert point of a
hatch pattern to 0,0, regardless of where the SNAPBASE
point was. Using HAT allows you to retain the actual
insert point used to create the pattern.
There are other tricks which HAT enables a creative thinker
to accomplish. If you have come up with a handy application
with HAT, I'd like to hear about it, I may even include it
in this section of future releases of HAT.
Page 11
------------------ENHANCEMENTS FOR HAT 2.0-------------------
| HAT 2.0 represents the highest achievement in hatching
| technology.
| Hat recognizes which version of AutoCAD is being used and
| responds accordingly, utilizing new features described
| below if it finds R.11 or higher.
| If R.10 is detected, HAT uses attributes to store hatch
| data. This is the same method as HAT versions 1.0 through
| 1.5.
| If R.11 is detected, HAT uses extended entity data to store
| the hatch data. This method is only possible due to new
| commands in R.11. Using extended entity data is better
| than attributes for the following reasons:
| -It is faster to generate.
| -It uses less memory.
| -It retains the name of the hatch block (an unnamed block)
| rather than having to make up a block name.
| -Attributes do not become stranded should the hatch block
| be exploded.
| HAT and HATREF will recognize the hatch Regardless of which
| type of hatch reference info is attached to the pattern, as
| long as the hatch was created with a version of HAT.
------------------ENHANCEMENTS FOR HAT 1.5-------------------
HAT 1.5 represents further enhancements made to the program
in response to registered and non registered user
suggestions.
HAT command repeat. If you press enter immediately after
using HAT, you get the Select objects: prompt, skipping
the initial HAT prompts. This has been added to more
closely imitate the standard hatch command.
N, O and I modifiers (normal, outermost and ignore) are
now allowed (preceded by a comma) for all legal pattern
names.
All legal pattern names are now supported, whether the
patterns are in the acad.pat file or are custom pattern
files located elsewhere.
The first pick for Select objects: prompt may now be a
window, crossing, previous, last or any other legal
response to a normal Select objects: prompt.
Page 12
------------------ENHANCEMENTS FOR HAT 1.4-------------------
HAT 1.4 represents further enhancements made to the program
in response to registered user suggestions.
A problem with text styles defined with a fixed height is
fixed. HAT is not affected by either fixed or variable
height text.
Reference blocks are now given unique names so that block
redefinition does not occur if a drawing with HAT reference
blocks is inserted onto another.
The color of HAT patterns is now changeable as are normal
hatch patterns.
HAT now reads the ACAD.PAT file with more versatility. If
a customized ACAD.PAT file is used, the pattern header does
not require the pattern description as required by HAT 1.3.
------------------ENHANCEMENTS FOR HAT 1.3-------------------
HAT 1.2 has been improved! The following is a list of the
improvements:
User defined hatch patterns are now allowed and fully
supported by HAT and HATREF. User defined hatch patterns
may even be matched with the Select option of HAT 1.3.
The Move option now works more like the AutoCAD Move
command. Absolute and relative points may be supplied
as well as Displacement.
Hatches created with HAT 1.3 may now be changed to
different layers and the hatch will adopt the
characteristics of that layer (color linetype etc.).
HAT 1.3 and HATREF will report the actual scale and angle
of a hatch pattern created with HAT even if it has been
scaled or rotated using AutoCAD editing commands.
Page 13
---------------------HAT TECHNICAL INFO----------------------
| HAT 2.0 is for use with R.10 or R.11 (dos).
HAT searches the ACAD.PAT file to determine if pattern names
typed in are valid. Custom hatch patterns, may be specified
if they are legal pattern definitions and are in a directory
where AutoCAD will find them.
HAT will bomb if you have set Undo Control to one or none.
| All versions of HAT prior to version 2.0 and HAT 2.0 running
| on R.10 use attributes to store the hatch information. If
| one such hatch pattern is exploded, the attributes will be
| stranded or left on your drawing.
| HAT 2.0 running on R.11 does not use attributes, rather
| extended entity data. This is more memory efficient,
| executes faster than creating attributes, and has no side
| effects if the hatch pattern is exploded.
| The stray attributes left from exploding hatch patterns
| generated by HAT 2.0 running on R.10 are basically harmless
but may be noticed as a dot on your plot (they're real
small). Also, if you insert the drawing on which the hatch
was exploded, into another drawing, then you will probably
get attribute prompts. To avoid these side effects,
1. don't explode hatch patterns
2. or, use HATCLR described above to erase the HAT
attributes. (Just type 'hatclr' after loading HAT).
Only the capitalized letters of the option keywords used in
HAT should be supplied. For example, to initiate the Select
option, an s or S are all that should be supplied. This is
necessary since a custom hatch patterns may have names
similar to the option keywords. If you make a custom screen
menu to supply responses to HAT requests, limit the response
options to only the necessary letters (such as S U RO).
If you find the performance of HAT to be inadequate, please
let me know by filling out the comments on the ORDER FORM.
I have found HAT to work best on AutoCAD 386 or Extended
lisp.
Michael E. Ross
610 E. Canon Perdido, 6
Santa Barbara, CA 93103-3037
U.S.A.
Compuserve 73527,726